import java.util.Date;

import gui.RabidSplash;
import gui.RabidUI;

/** 
 * @author Andrew Bernard 
 */
public class RABID { 
  
  public static void main(String[] args) {
    try {
      if(args.length > 0) {
        System.err.println("RABID takes no arguments.");
        System.exit(-1);
      }
      else {
        long start = new Date().getTime();
        RabidSplash splash = new RabidSplash();
        splash.showSplash();
        RabidUI ui = new RabidUI();
        ui.createGui();
        long end = new Date().getTime();
        
        //just a little delay to show off the splash screen ;)
        long elapsed = end - start;        
        final long timeToWait = 5000; //in milliseconds
        Thread.sleep(timeToWait - elapsed);
        
        splash.hideSplash();
        ui.setVisible(true);        
      }
    }
    catch (Throwable thr) {
//      thr.printStackTrace();
      System.err.println(thr.getMessage());
      System.exit(-1);
    }
  }
}
